Oscillator

ABSTRACT

An oscillator circuit is described comprising of a capacitor; a capacitor charging means arranged to supply a current to charge the capacitor to a first predetermined threshold voltage; a capacitor discharging means arranged to discharge the capacitor to a second predetermined threshold voltage; and a switching means arranged to switch between a capacitor discharging mode and a capacitor charging mode. The switching means is responsive to the capacitor reaching at least one of said threshold voltages. Furthermore at least one threshold voltage is determined by a threshold setting means, which provides a voltage threshold that varies to compensate for changes in temperature.

FIELD OF THE INVENTION

[0001] This invention relates to oscillator circuits and particularly totemperature compensated oscillator circuits.

BACKGROUND OF THE INVENTION

[0002] A problem with many known types of oscillator circuit is thatvariations in temperature cause changes in the oscillation frequency. Insome cases the oscillation frequency can increase with temperature,whereas in other cases the oscillation frequency can decrease withtemperature For example, consider oscillator circuits which rely onrepeated charging and discharging cycles of a capacitor to generate anoscillating voltage signal. A problem with such oscillator circuits canbe that the rate of current flow on and off the capacitor C increaseswith increasing temperature As a result, the capacitor charges anddischarges faster at high temperatures and thus reaches respective upperand lower voltage limits in less time. This means that the frequency ofthe oscillating signal increases with temperature and hence suchoscillators are unreliable in timing applications.

SUMMARY OF THE INVENTION

[0003] Embodiments of the present invention seek to provide oscillatorcircuits having improved temperature characteristics.

[0004] According to a first aspect of the present invention, there isprovided oscillator circuitry comprising a capacitor; capacitor chargingmeans arranged to supply a current to charge the capacitor to a firstpredetermined threshold voltage; capacitor discharging means arranged todischarge the capacitor to a second predetermined threshold voltage; andswitching means arranged to switch between a capacitor discharging modeand a capacitor charging mode responsive to reaching at least ore ofsaid threshold voltages, wherein the at least one threshold voltage isdetermined by a threshold setting means which provides a voltagethreshold which varies to compensate for changes in temperature.

[0005] Preferably, the threshold setting means comprises a currentsource and a resistive means which varies in resistance in dependenceupon temperature.

[0006] In preferred embodiments, the switching means comprises acomparator arranged to monitor voltage across the capacitor and totrigger a change between the discharging and charging modes.

[0007] In such case, the comparator is connected to a first controltransistor which sets the first and second predetermined thresholdvoltages of the capacitor

[0008] The first control transistor may be arranged to selectivelyby-pass an element of a resistive chain.

[0009] Preferably, the comparator is also connected to a second controltransistor which controls current flow to facilitate charging anddischarging of the capacitor means.

[0010] Typically, the resistive means comprises one or morediode-connected transistors.

[0011] Each said capacitor charging means comprising a current sourceand preferably an IPTAT current source. Preferably, each said capacitordischarging means comprises a current source of the same type.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Embodiments of the present invention will now be described by wayof example only with reference to the accompanying drawings in which;

[0013]FIG. 1 shows a first embodiment of an oscillator circuit;

[0014]FIG. 2 shows another oscillator circuit embodying the presentinvention; and

[0015]FIG. 3 shows the variation of output voltage over time for theoscillator of FIG. 2 at two different temperatures.

DESCRIPTION OF PREFERRED EMBODIMENTS OF THE PRESENT INVENTION

[0016] One type of oscillator circuit 10 is shown in FIG. 1 Theoscillator circuit 10 comprises a first power supply rail 12 and asecond power supply rail 14. A first current source 16 is connectedbetween the first power supply rail 12 and a first transistor M1 togenerate IPTAT, a current proportional to absolute temperature Thetransistor M1 has its controllable path connected between the firstcurrent source 16 and a second IPTAT current source 18 which is itselfconnected to the second power supply rail 14. The first current source16, the transistor M1 and the second current source 18 are connected inseries between the first power supply rail 12 and the second powersupply rail 14.

[0017] A capacitor C has a first terminal connected to a node 20 betweenthe first current source 16 and the transistor M1. The second terminalof the capacitor C is connected to the second power supply rail 14. Acomparator 30 is disposed in the circuit 10 SO as to comprise aswitching device. The comparator 30 has a first (positive) inputconnected to the first terminal of the capacitor C and the node 20between the first current source 16 and the transistor M1. A second(negative) input of the comparator 30 is connected to a node 32 of aresistive chain comprising first, second and third resistors R₁, R₂ andR₃. The resistors R₁, R₂ and R₃ are connected in series between thefirst power supply rail 12 and the second power supply rail 14. The node32 to which the second input of the comparator 30 is connected is at thejunction between the first resistor R₁ and the second resistor R₂ of theresistive chain R₁, R₂ and R₃.

[0018] The output 34 of the comparator 30 is supplied to the controlterminal of a further transistor M2 which has its controllable pathconnected between the second power supply rail 14 and a node 36 betweenthe second resistor R₂ and the third resistor R₃ of the resistive chainR₁, R₂ and R₃. The output 34 of the comparator 30 is also supplied tothe control terminal of the first transistor M1. The first and secondtransistors M1 and M2 are thus both controlled by the output signal ofthe comparator 30.

[0019] In the above circuit there are two current sources 16, 18. Thefirst current source 16 produces the current I and the second currentsource 18 produces the current 2I In the charging phase of thecapacitor, the transistors M1 and M2 are turned off. With the transistorM1 in an off state, the current I from the first current source 16 issupplied to the first terminal of the capacitor C. The voltage V₁ on thecapacitor C (i.e. the voltage on the first terminal of the capacitorreferred to the second supply rail) rises until it reaches the voltageV₂ of the junction between the first and second resistors R₁ and R₂referred to the second supply rail 14.

[0020] When the voltage V₁ on the capacitor C reaches the voltage V₂ atthe node 32, the transistors M1 and M2 are turned on. With thetransistor M1 turned on, the capacitor C enters its discharging phase.The capacitor C is discharged by a predetermined amount. Since theconducting transistor M2 bypasses (shorts) the third resistor R3, thevoltage V₂ at the node 32 referred to the power supply rail 14 isreduced to a lower voltage. The capacitor C discharges until a lowerthreshold is reached at which point in time the comparator switches backthereby turning off the transistors M1 and M2 to begin the chargingcycle again.

[0021] Thus the capacitor C is charged by the first current source 16until an upper threshold voltage close to the supply voltage is reached.The current supply to the capacitor is then “reversed”, such that thecapacitor C is discharged until a lower threshold voltage close to zerovolts is reached. The current supply is “reversed” again and the cyclerepeated. Repeat cycles of charging and discharging the capacitor Cproduce voltage oscillations on the capacitor referred to the secondpower supply rail 14. The voltage across the capacitor plates representsa substantially triangular waveform over time. A square wave for examplefor use in timing applications can be produced from the triangular waveby taking the output of an inverter having its input connected to thecapacitor or the output of the comparator.

[0022]FIG. 2 shows an oscillator circuit 100 in accordance with anembodiment of the invention which is capable of generating an outputsignal having a frequency which is substantially independent oftemperature variations. The oscillator circuit 100 comprises a firstpower supply rail 112 and a second power supply rail 114. A first IPTATcurrent source 116 is connected between the first power supply rail 112and a first Transistor M3. The transistor M3 has its controllable pathconnected between the first current source 116 and a second IPTATcurrent source 118 which is itself connected to the second power supplyrail 114. The first current source 116, the transistor M3 and the secondcurrent source 118 are connected in series between the first powersupply rail 112 and the second power supply rail 114.

[0023] A capacitor C′ has a first terminal connected to a node 120between the first current source 116 and the transistor M3. A secondterminal of the capacitor C is connected to the second power supply rail114. A comparator 130 is disposed in the circuit 100 so as to comprise aswitching device. The comparator 130 has a first (positive) inputconnected to the first terminal of the capacitor C′ and true node 120 atthe junction between the first current source 116 and the transistor M3.A second (negative) input of the comparator 130 is connected to a node132 of a component chain comprising in series a third IPTAT currentsource 150, a diode-connected transistor M5 and a resistor R. The thirdcurrent source 150 is connected between the first power supply rail 112and the diode-connected transistor M5. The resistor R is connectedbetween the diode-connected transistor M5 and the second power supplyrail 114. The node 132 to which the second input of the comparator 130is connected is at the junction between the third current source 150 andthe diode-connected transistor M5.

[0024] The output 134 of the comparator 130 is supplied to the controlterminal of a transistor M4 which has its controllable path connectedbetween the second power supply rail 114 and a node 136 at the junctionbetween the diode-connected transistor M5 and the resistor R. The output134 of the comparator 130 is also supplied to the control terminal ofthe first transistor M3. The first and second transistors M3 and M4 arecontrolled by the output signal 134 of the comparator as will beexplained below.

[0025] In use, the capacitor C′ is charged and discharged by the firstand second current sources 116 and 118, respectively. The first currentsource 116 produces the current I. In the charging phase the transistorsM3 and M4 are both turned off. With the transistor M3 turned off, thecurrent I from the first current source 116 is supplied to the firstterminal of the capacitor C. As the charge on the plate of the capacitorC′ accumulates, the voltage V₃ across the capacitor increases until itreaches the voltage V₄ between the function 132 and the second powersupply rail 114. With the transistor M4 turned off the voltage V₄depends on the resistance of the circuit branch containing thediode-connected transistor M5 and the resistor R. That is, in thecharging phase the upper voltage threshold of the capacitor isdetermined by the voltage across the series combination of thediode-connected transistor M5 and the resistor R.

[0026] When the voltage V₃ across the capacitor C′ reaches that betweenthe node 132 and the second power supply rail 114, the output of thecomparator 130 changes state. The change in the state of the output ofthe comparator 130 is effective to switch the transistors M3 and M4 on.When the transistor M3 is turned on the capacitor C′ enters itsdischarging phase. The capacitor C′ is discharged by a predeterminedamount. For example, the second current source 118 passes a current 21and the first current source passes a current I, the capacitor isdischarged by an amount I (where I=2I−I). That is, the voltage V₃ acrossthe plates capacitor C′ is reduced to a lower threshold voltagedetermined by the voltage V₄ at node 132 referred to the second powersupply rail 114. The voltage V₄ at the node 132 is dependent only uponthe resistance of the diode-connected transistor M5 since the transistorM4 is now turned on and defines a lower resistance pathway between thesecond power supply rail 114 and the diode-connected transistor M5.

[0027] When the capacitor C′ is discharged to the extent that this lowervoltage threshold is reached the output of the comparator changes stateagain and the transistors M3 and M4 are switched back to their offstates to begin the charging cycle again. The above described chargingand discharging phases are repeated many times to generate anoscillating triangular waveform. The oscillating triangular waveform isconverted to a square waveform by taking the output of an inverterhaving its input connected to the capacitor.

[0028]FIG. 3 illustrates how the capacitor voltage generated by theembodiment of FIG. 2 varies with time at two different temperatures.Voltage increases along the y-axis is and the time along the X-axis. Thesolid triangular wave 302 represents the voltage V₃ across the capacitorplates at a first temperature T1. The broken triangular waveform 304represents the voltage V₃ across the capacitor plates at a temperatureT₂ which is higher than the first temperature T1. (i.e. T₂≦T₁).

[0029] At the lower temperature T1, the voltage V₃ across the plates ofthe capacitor C′ oscillates between an, upper limit UL and a lower limitLL_(T1). The upper UL is defined during the charging phases of thecapacitor C by the voltage across the series combination of thediode-connected transistor M5 and the resistor R. The lower limitLL_(T1) is defined during the discharging phases of the capacitor C′ bythe voltage across the diode-corrected transistor M5 only. The result ofcontinuous oscillation between these upper and lower limits UL, LL_(T1)is a substantially triangular waveform having a trough-to-trough periodof t₁ and thus a frequency of 1/t₁.

[0030] At the higher temperature T₂ the voltage on the capacitor C′oscillates between the same upper limit UL and a lower limit LLT₂. Theupper limit UL is defined n the charging phase of the capacitor C′ inthe same way as above. As temperature increases the charging anddischarging currents increase and hence the capacitor charges anddischarges to its upper and lower threshold voltages at a greater rate.This is demonstrated by the steeper gradients of the waveform designatedby reference numeral 304 compared with the gradients of the waveform 302on FIG. 3. The lower voltage threshold during the discharging phase of acapacitor C′ in a circuit such as that shown in FIG. 3 is dependent onthe resistance of the diode-connected transistor. The lower voltagethreshold LL_(T2) at temperature T₂ is less than the lower voltagethreshold LL_(T1) at the temperature T₁. The voltage across thediode-connected transistor M5 gets smaller with increasing temperatureand hence the lower voltage threshold LL_(T2) at higher temperatures isshifted to a lower value by a potential difference ΔV. True downwardshift in the lower voltage threshold means that the capacitor C′ mustundertake a larger voltage swing between the upper and lower voltagethresholds defining the charged and discharged states. The largervoltage swing compensates for the increased charging and dischargingrates such that the period of oscillation at the higher temperature issubstantially the same as in the lower temperature case (i.e. the periodt₁−the period t₂). That is, the oscillation frequency remains the sameat the higher temperature T₂ as it is at the lower temperature T₁.

[0031] Oscillator circuits embodying the present invention can providean oscillating waveform at frequencies which do not vary in dependenceupon temperature conditions. This is achieved by employing thresholdvoltage setting means which can vary a voltage level at which theoscillator switches between oscillation cycles in dependence upon thetemperature of the environment in which the oscillator is operating.

[0032] In the preferred embodiment a current source is implemented as asingle diode-connected transistor M5. The skilled person wouldappreciate that while only one such diode-connected transistor isdesignated by reference numeral M5 two or more diode-connectedtransistors may be coupled together and used to facilitate largervoltage swings.

[0033] Embodiments of the present invention are not limited to theconfiguration of the embodiment described herein. Specifically theembodiment described herein is intended to illustrate one example of aconfiguration which may be used to implement the invention.

1. Oscillator circuitry comprising: a capacitor; capacitor chargingmeans arranged to supply a current to charge the capacitor to a firstpredetermined threshold voltage; capacitor discharging means arranged todischarge the capacitor to a second predetermined threshold voltage; andswitching means arranged to switch between a capacitor discharging modeand a capacitor charging mode responsive to reaching at least one ofsaid threshold voltages, wherein the at least one threshold voltage isdetermined by a threshold setting means which provides a voltagethreshold which varies to compensate for changes in temperature. 2.Circuitry as claimed in claim 1, wherein the threshold setting meanscomprises a current source and a resistive means which varies inresistance in dependence upon temperature.
 3. Circuitry as claimed inclaim 1, wherein the switching means comprises a comparator arranged tomonitor voltage across the capacitor and to trigger a change between thedischarging and charging modes.
 4. Circuitry as claimed in claim 3,wherein the comparator is connected to a first control transistor whichsets the first and second predetermined threshold voltages of thecapacitor.
 5. Circuitry as claimed in claim 4, wherein the first controltransistor is arranged to selectively by-pass an element of a resistivechain.
 6. Circuitry as claimed in claim 3, wherein the comparator isconnected to a second control transistor which controls current flow tofacilitate charging and discharging of the capacitor means.
 7. Circuitryas claimed in claim 2, wherein the resistive means comprises one or morediode-connected transistors.
 8. Circuitry as claimed in claim 1, whereinthe capacitor charging means comprises a current source.
 9. Circuitry asclaimed in claim 1, wherein the capacitor discharging means comprises acurrent source.
 10. Oscillator circuitry comprising: a capacitor; acapacitor charger arranged to supply a current to charge the capacitorto a first predetermined threshold voltage; a capacitor dischargerarranged to discharge the capacitor to a second predetermined thresholdvoltage; and a switch arranged to switch between a capacitor dischargingmode and a capacitor charging mode responsive to reaching at least oneof said threshold voltages, wherein the at least one threshold voltageis determined by a threshold setting circuitry which provides a voltagethreshold which varies to compensate for changes in temperature.